package com.lhy.common.web.wrapper.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.lhy.common.web.entity.ComparatorEnum;
import com.lhy.common.web.entity.DbField;
import com.lhy.common.web.wrapper.AbstractSearchComparator;

public class NotBetweenSearchComparator extends AbstractSearchComparator {

    @Override
    public void accept(QueryWrapper queryWrapper, DbField dbField) {
        String[] split = dbField.getValue().split(",");
        queryWrapper.between(dbField.getName(), split[0], split[1]);
    }

    @Override
    public ComparatorEnum comparatorEnum() {
        return ComparatorEnum.NE;
    }
}
